3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
QuickDraw 3D provides routines that you can use to manage shape objects (or shapes). A shape object is any object that affects how and where a renderer renders an object in a view.
QuickDraw 3D provides six shape management routines that are identical in implementation to set routines discussed earlier:
Other shape management routines are described below.
You can use the Q3Shape_GetType function to get the type of a shape.
TQ3ObjectType Q3Shape_GetType (TQ3ShapeObject shape);
The Q3Shape_GetType function returns, as its function result, the type of the shape specified by the shape parameter. The types of shapes currently supported by QuickDraw 3D are defined by these constants:
kQ3ShapeTypeCamera
kQ3ShapeTypeGeometry
kQ3ShapeTypeGroup
kQ3ShapeTypeLight
kQ3ShapeTypeShader
kQ3ShapeTypeStyle
kQ3ShapeTypeTransform
kQ3ShapeTypeUnknown
If the type of the shape cannot be determined or is invalid, Q3Shape_GetType returns the value kQ3ObjectTypeInvalid .
You can use the Q3Shape_GetSet function to get the set currently associated with a shape.
TQ3Status Q3Shape_GetSet (TQ3ShapeObject shape, TQ3SetObject *set);
You can use the Q3Shape_SetSet function to set the set associated with a shape.
TQ3Status Q3Shape_SetSet (TQ3ShapeObject shape, TQ3SetObject set);
Previous | QD3D Book | Overview | Chapter Contents | Next |